package com.czf.company.controller;

import com.czf.common.entity.BankUserInfo;
import com.czf.common.util.AjaxResult;
import com.czf.company.service.BankInfoServiceImpl;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author zfChen
 * @create 2022/4/25 10:53
 */
@RestController
@CrossOrigin
@Slf4j
@RequestMapping("/company")
public class BankInfoController {

    @Autowired
    private BankInfoServiceImpl bankInfoService;

    @RequestMapping(value = "/selectBankInfo",method = RequestMethod.GET)
    public AjaxResult select(BankUserInfo bankUserInfo, Long userId){
        int select = bankInfoService.select(bankUserInfo,userId);
        if (select == 10) {
            return AjaxResult.error();
        }
        return AjaxResult.success(select);
    }


}
